

#include <ioapic.h>

// TODO: modify this stuff?

dword read_ioapic(void *addr, dword reg)
{
	volatile dword * ioapic = (volatile dword*)addr;
   	ioapic[0] = reg;
   	return ioapic[4];
}

void write_ioapic(void *addr, dword reg, dword val)
{
	volatile dword * ioapic = (volatile dword*)addr;
  	ioapic[0] = reg;
   	ioapic[4] = val;
}
